<%-- 
    Document   : drinks
    Created on : Oct 18, 2011, 2:16:44 PM
    Author     : javierpanchi
--%>

<%@page contentType="text/html" pageEncoding="UTF-8" import="edu.uq.comp7705.entity.Session"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>

    <head> 
        <title>Drinks</title> 
        <meta name="viewport" content="width=device-width, initial-scale=1,text/html; charset=UTF-8"> 
        <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.css" />
        <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
        <script type="text/javascript" src="http://code.jquery.com/mobile/1.0b2/jquery.mobile-1.0b2.min.js"></script>
        <script type="text/javascript" src="/Drinkmeter/js/general.js"></script>
        <link rel="stylesheet" href="/Drinkmeter/css/TabStyle.css">
    </head> 

    <body onload="timerCount('drinks')">
        <div data-role="page">
            <div data-role="header">
                <h1>Drinks</h1>
            </div><!-- /header -->
            <br>
            <div data-role="content">
                <form name="form1" action="/Drinkmeter/General?opt=add">
                    <table border="0">
                    <tr>
                        <td align="center"><img src='/Drinkmeter/images/icons/add/Carlton-Cold.png' onclick="assignVariable('1')"/><br/><font size="1">Carlton-Cold</font></td>
                        <td align="center"><img src='/Drinkmeter/images/icons/add/Carlton-Mid.png' onclick="assignVariable('2')"/><br/><font size="1">Carlton-Mid</td>
                        <td align="center"><img src='/Drinkmeter/images/icons/add/Corona.png' onclick="assignVariable('3')"/><br/><font size="1">Corona</td>
                        <td align="center"><img src='/Drinkmeter/images/icons/add/Tooheys-extra-try.png' onclick="assignVariable('4')"/><br/><font size="1">Tooheys-ExtT</td>
                    </tr>
                    <tr>
                        <td align="center"><img src='/Drinkmeter/images/icons/add/Tooheys-new.png' onclick="assignVariable('5')"/><br/><font size="1">Tooheys</td>
                        <td align="center"><img src='/Drinkmeter/images/icons/add/XXXX-bitter.png' onclick="assignVariable('6')"/><br/><font size="1">XXXX-bitter</td>
                        <td align="center"><img src='/Drinkmeter/images/icons/add/XXXX-gold.png' onclick="assignVariable('7')"/><br/><font size="1">XXXX-gold</td>
                        <td align="center"><img src='/Drinkmeter/images/icons/add/XXXX-summer.png' onclick="assignVariable('8')"/><br/><font size="1">XXXX-summer</td>
                    </tr>
                    <tr>
                        <td align="center"><img src='/Drinkmeter/images/icons/add/Absinthe.png' onclick="assignVariable('9')"/><br/><font size="1">Absinthe</td>
                        <td align="center"><img src='/Drinkmeter/images/icons/add/Bacardi.png' onclick="assignVariable('10')"/><br/><font size="1">Bacardi</td>
                        <td align="center"><img src='/Drinkmeter/images/icons/add/Rum.png' onclick="assignVariable('11')"/><br/><font size="1">Rum</td>
                        <td align="center"><img src='/Drinkmeter/images/icons/add/Bourbon.png' onclick="assignVariable('12')"/><br/><font size="1">Bourbon</td>
                    </tr>
                    <tr>
                        <td align="center"><img src='/Drinkmeter/images/icons/add/Brandy.png' onclick="assignVariable('13')"/><br/><font size="1">Brandy</td>
                        <td align="center"><img src='/Drinkmeter/images/icons/add/Smirnoff-Vodka.png' onclick="assignVariable('14')"/><br/><font size="1">Smirnoff-Vodka</td>
                        <td align="center"><img src='/Drinkmeter/images/icons/add/Southern-Comfort.png' onclick="assignVariable('15')"/><br/><font size="1">Southern-Comfort</td>
                        <td align="center"><img src='/Drinkmeter/images/icons/add/johnny-walker.png' onclick="assignVariable('16')"/><br/><font size="1">Johnny Walker</td>
                    </tr>
                    <tr>
                        <td align="center"><img src='/Drinkmeter/images/icons/add/red-wine.png' onclick="assignVariable('17')"/><br/><font size="1">Red Wine</td>
                        <td align="center"><img src='/Drinkmeter/images/icons/add/white-wine.png' onclick="assignVariable('18')"/><br/><font size="1">White Wine</td>
                        <td align="center"><img src='/Drinkmeter/images/icons/add/Tequilla.png' onclick="assignVariable('19')"/><br/><font size="1">Tequila</td>
                        <td align="center"><img src='/Drinkmeter/images/icons/add/gin.png' onclick="assignVariable('20')"/><br/><font size="1">Gin</td>
                    </tr>
                    </table>
                    <a href="javascript:clean()">Undo Drinks</a>
                    <br/>
                    <table>
                        <c:forEach var='session' items='${sessionDrink}'>
                            <td>
                                <img src='https://graph.facebook.com/${session.facebookid}/picture' onclick="addDrink('${session.facebookid}')"/><br/>
                                <div id="elements_${session.facebookid}">
                                    <div id="ad_1_${session.facebookid}" style="display:none"/>0</div>
                                <div id="ad_2_${session.facebookid}" style="display:none"/>0</div>
                                <div id="ad_3_${session.facebookid}" style="display:none"/>0</div>
                                <div id="ad_4_${session.facebookid}" style="display:none"/>0</div>
                                <div id="ad_5_${session.facebookid}" style="display:none"/>0</div>
                                <div id="ad_6_${session.facebookid}" style="display:none"/>0</div>
                                <div id="ad_7_${session.facebookid}" style="display:none"/>0</div>
                                <div id="ad_8_${session.facebookid}" style="display:none"/>0</div>
                                <div id="ad_9_${session.facebookid}" style="display:none"/>0</div>
                                <div id="ad_10_${session.facebookid}" style="display:none"/>0</div>
                                <div id="ad_11_${session.facebookid}" style="display:none"/>0</div>
                                <div id="ad_12_${session.facebookid}" style="display:none"/>0</div>
                                <div id="ad_13_${session.facebookid}" style="display:none"/>0</div>
                                <div id="ad_14_${session.facebookid}" style="display:none"/>0</div>
                                <div id="ad_15_${session.facebookid}" style="display:none"/>0</div>
                                <div id="ad_16_${session.facebookid}" style="display:none"/>0</div>
                                <div id="ad_17_${session.facebookid}" style="display:none"/>0</div>
                                <div id="ad_18_${session.facebookid}" style="display:none"/>0</div>
                                <div id="ad_19_${session.facebookid}" style="display:none"/>0</div>
                                <div id="ad_20_${session.facebookid}" style="display:none"/>0</div>
                                </div>
                            </td>
                        </c:forEach>
                    </table>
                    <div style="top: 310.5px;" class="ui-loader ui-body-a ui-corner-all"><span class="ui-icon ui-icon-loading spin"></span><h1>loading</h1></div>
                </form>
                <footer>
                    <div id='tabbarcontainer'>
                        <ul id='tabbar'>
                            <div id="mensajes"></div>
                            <li class='tab'><a href="#" id='tab_home' onclick="window.location='/Drinkmeter'">Tab 1</a></li>
                            <li class='tab'><a href="#" onclick="window.location='/Drinkmeter/General?opt=friends'" id='tab_friends'>Tab 2</a></li>
                            <li class='tab'><a href="#" onclick="window.location='/Drinkmeter/jsp/drinks.jsp'" id='tab_drinks'>Tab 3</a></li>
                            <li class='tab'><a href="#" onclick="window.location='/Drinkmeter/DrinksServlet?opt=report'" id='tab_stats'>Tab 4</a></li>
                            <li class='tab'><a href="#" onclick="window.location='/Drinkmeter/jsp/leave.jsp'" id='tab_locations'>Tab 5</a></li>
                        </ul>
                    </div>
                    <script type='text/javascript'>
                        $('li.tab a').bind('click', function(event) {
                            $('li.tab a').removeClass('active');
                            $(event.target).addClass('active');
                        });
                    </script>
                </footer>
            </div><!-- /content -->
        </div>
    </body>
</html>
